package com.study.mall.design.observer;

public class Reader implements Observer {
    private String name;

    public Reader(String name) {
        this.name = name;
    }

    @Override
    public void update(Subject subject) {
        String content = ((NewsPaper)subject).getContent();
        System.out.println(name + "收到报纸，本期内容： " + content);
    }
}
